package com.hzdl.flower.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzdl.flower.bean.Admin;
import com.hzdl.flower.bean.Log;
import com.hzdl.flower.mapper.LogMapper;
import com.hzdl.flower.service.LogService;
import com.hzdl.flower.vo.LogVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogServiceImpl implements LogService {
    @Autowired
    private LogMapper lm;

    
    @Override
    public PageInfo findLog(LogVo logVo) {
        PageHelper.startPage(logVo.getPage(), logVo.getLimit());
        List<Log>logs = lm.findLog(logVo);
        PageInfo pageInfo = new PageInfo(logs);
        return pageInfo;
    }

    @Override
    public Log findByid(Integer id) {
        return lm.findByid(id);
    }

    @Override
    public int addLog(LogVo logVo) {
        return lm.addLog(logVo);
    }

    @Override
    public int deleteById(Integer id) {
        return lm.deleteById(id);
    }
}
